<?php
class DATABASE_CONFIG {

    var $desarrollo = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'root',
        'password' => '',
        'database' => 'productores',
        'encoding' => 'utf8'
    );

    var $produccion = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'productores',
        'password' => 'admproductores',
        'database' => 'productores',
        'encoding' => 'utf8'
    );

    var $default = array();

    //selecciona la bd automaticamente
    //dependiendo de la ip del servidor
    function __construct()
    {
        if($_SERVER['SERVER_ADDR'] == '127.0.0.1'){
            $this->default = $this->desarrollo;
        }else{
            $this->default = $this->produccion;
        }
    }

    function DATABASE_CONFIG()
    {
        $this->__construct();
    }
}
?>